﻿
Namespace LightSwitchApplication

    Public Class PayPeriodItem

        Private Sub PayPeriodLookupField_Compute(ByRef result As String)
            ' Set result to the desired field value
            result = StartDate & " - " & EndDate
        End Sub

        Private Sub StartDate_Validate(results As EntityValidationResultsBuilder)
            ' results.AddPropertyError("<Error-Message>")
            If StartDate > EndDate Then
                results.AddPropertyError("Start date should be earlier than end date.")
            End If
        End Sub
    End Class

End Namespace
